<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>

<script>
  function Prime(a) {
    var sure = true;
    for (var j = 2; j < a; j++) {
      if (a % j == 0) {
        console.log("这个数不是质数");
        sure = 0;
        break;
      }
    }
    if (sure) {
      console.log("这个数是质数");
    }
  }

  Prime(7);
</script>
